<#assign title="导航菜单编辑页面">
<#include "/admin/inc/top.html"/>
<div class="main-content" id="main-content">
    <header class="header navbar bg-white shadow">
        <div class="btn-group tool-button">
            <a class="btn btn-primary navbar-btn" href="${base!}/private/fof/sysMenu" data-pjax><i
                    class="fa fa-reply"></i> 返回</a>
        </div>
    </header>
    <section class="content">
        <div class="form-wrapper" style="min-height:500px;">
            <section class="panel panel-form">
                <form id="unitAddForm" role="form" class="form-horizontal parsley-form" data-parsley-validate
                      action="${base!}/private/fof/sysMenu/editDo" method="post">
                    <input type="hidden" name="id" value="${sysMenu.id}">
                    <div class="row mb10">
                        <div class="col-lg-12">
                            <div class="form-group">
                                <label for="parentId" class="col-sm-2 control-label">父级ID</label>

                                <div class="col-sm-8">
                                    <input type="text" id="parentId" class="form-control" name="parentId"
                                     placeholder="父级ID" value="${sysMenu.parentId}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="name" class="col-sm-2 control-label">菜单名称</label>

                                <div class="col-sm-8">
                                    <input type="text" id="name" class="form-control" name="name"
                                     placeholder="菜单名称" value="${sysMenu.name}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="aliasName" class="col-sm-2 control-label">菜单别名</label>

                                <div class="col-sm-8">
                                    <input type="text" id="aliasName" class="form-control" name="aliasName"
                                     placeholder="菜单别名" value="${sysMenu.aliasName}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="type" class="col-sm-2 control-label">资源类型
1：link
2：menu</label>

                                <div class="col-sm-8">
                                    <input type="text" id="type" class="form-control" name="type"
                                     placeholder="资源类型
1：link
2：menu" value="${sysMenu.type}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="href" class="col-sm-2 control-label">菜单链接</label>

                                <div class="col-sm-8">
                                    <input type="text" id="href" class="form-control" name="href"
                                     placeholder="菜单链接" value="${sysMenu.href}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="target" class="col-sm-2 control-label">打开方式
data-pjax:用pjax方式打开
blank:新页面
self:当前页面
</label>

                                <div class="col-sm-8">
                                    <input type="text" id="target" class="form-control" name="target"
                                     placeholder="打开方式
data-pjax:用pjax方式打开
blank:新页面
self:当前页面
" value="${sysMenu.target}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="icon" class="col-sm-2 control-label">菜单图标</label>

                                <div class="col-sm-8">
                                    <input type="text" id="icon" class="form-control" name="icon"
                                     placeholder="菜单图标" value="${sysMenu.icon}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="isShow" class="col-sm-2 control-label">是否显示
0：不显示
1：显示</label>

                                <div class="col-sm-8">
                                    <input type="text" id="isShow" class="form-control" name="isShow"
                                     placeholder="是否显示
0：不显示
1：显示" value="${sysMenu.isShow}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="disabled" class="col-sm-2 control-label">是否禁用
0：禁用
1：正常</label>

                                <div class="col-sm-8">
                                    <input type="text" id="disabled" class="form-control" name="disabled"
                                     placeholder="是否禁用
0：禁用
1：正常" value="${sysMenu.disabled}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                    </div>
                    <div class="col-lg-3"></div>
                    <div class="col-lg-6">
                        <div class="form-group text-center">
                            <label></label>

                            <div>
                                <button class="btn btn-primary btn-block btn-lg btn-parsley"
                                        data-loading-text="正在提交...">提 交
                                </button>
                            </div>
                        </div>
                    </div>
                </form>
            </section>

        </div>
        <a class="exit-offscreen"></a>
    </section>
</div>
<script language="JavaScript">

    $(document).ready(function () {
        //initTreeView();
        $('#unitAddForm').ajaxForm({
            dataType: 'json',
            beforeSubmit: function (arr, form, options) {
                form.find("button:submit").button("loading");
            },
            success: function (data, statusText, xhr, form) {
                if (data.code == 200) {
                    Toast.success(data.msg);
                } else {
                    Toast.error(data.msg);
                }
                form.find("button:submit").button("reset");
            }
        });
    });
</script>
<#include "/admin/inc/bottom.html"/>